﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;

namespace WindowsFormsTest.Purchase
{
    public partial class PurchaseOrderManager : MainTabUserContorl
    {
        string[][] initData = new string[][] { new string[] { "00-111222-3344", "汉光电器", "A", "2000.0000", "RMB", "2012-1-1", "2012-2-3", "增值发票", "深圳湾口岸", "车公庙","2012-1-1","" } , new string[] {"00-111222-3346", "华为科技", "A", "6000.0000", "RMB", "2012-1-1", "2012-2-3", "增值发票", "深圳湾口岸", "车公庙","2012-1-1","" }};

        public void setModel(ManagerModel modelType)
        {
            switch (modelType)
            {
                case ManagerModel.SEARCH:
                    {
                        this.splitContainer2.Panel1Collapsed = true;

                        break;
                    }
                default:
                    {
                        break;
                    }
            }
        }
        public PurchaseOrderManager()
        {
            InitializeComponent();

            this.dataGridView1.Rows.Add();
            for (int i = 0; i < initData.Length; i++)
            {
                for (int j = 0; j < initData[0].Length; j++)
                {
                    this.dataGridView1.Rows[i].Cells[j].Value = initData[i][j];
                }

            }
        }

        private void label3_Click(object sender, EventArgs e)
        {

        }

        private void label4_Click(object sender, EventArgs e)
        {

        }

        private void textBox3_TextChanged(object sender, EventArgs e)
        {

        }

        private void button4_Click(object sender, EventArgs e)
        {

        }

        private void button9_Click(object sender, EventArgs e)
        {
            Public.Operator.Create_MainTabPage(Public.OperatorLabelEnum.PURCHASE_ADD,Public.WindowModel.DEFAULT,this.MainForm);

          
        }
        private MainForm mainForm;

        public void SetMainForm(MainForm mainForm)
        {
            this.mainForm = mainForm;
        }

        private void dataGridView1_RowHeaderMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            PurchaseOrderAuditForm f = new PurchaseOrderAuditForm();
            f.ShowDialog();
        }
        
    }

   

}
